A Fast Single-Key Two-Level Universal Hash Function
نویسندگان
چکیده
Universal hash functions based on univariate polynomials are well known, e.g. Poly1305 and GHASH. Using Horner’s rule to evaluate such hash functions require ` − 1 field multiplications for hashing a message consisting of ` blocks where each block is one field element. A faster method is based on the class of Bernstein-Rabin-Winograd (BRW) polynomials which require b`/2c multiplications and blg `c squarings for ` ≥ 3 blocks. Though this is significantly smaller than Horner’s rule based hashing, implementation of BRW polynomials for variable length messages present significant difficulties. In this work, we propose a two-level hash function where BRW polynomial based hashing is done at the lower level and Horner’s rule based hashing is done at the higher level. The BRW polynomial based hashing is applied to a fixed number of blocks and hence the difficulties in handling variable length messages is avoided. Even though the hash function has two levels, we show that it is sufficient to use a single field element as the hash key. The basic idea is instantiated to propose two new hash functions, one which hashes a single binary string and the other can hash a vector of binary strings. We describe two actual implementations, one over F2128 and the other over F2256 both using the pclmulqdq instruction available in modern Intel processors. On both the Haswell and Skylake processors, the implementation over F2128 is faster than the highly optimised implementation of GHASH by Gueron. We further show that the Fast Fourier Transform based field multiplication over F2256 proposed by Bernstein and Chou can be used to evaluate the new hash function at a cost of about at most 46 bit operations per bit of digest, but, unlike the Bernstein-Chou analysis, there is no hidden cost of generating the hash key. More generally, the new idea of building a two-level hash function having a single field element as the hash key can be applied to other finite fields to build new hash functions.
منابع مشابه
String hashing for linear probing
Linear probing is one of the most popular implementations of dynamic hash tables storing all keys in a single array. When we get a key, we first hash it to a location. Next we probe consecutive locations until the key or an empty location is found. At STOC’07, Pagh et al. presented data sets where the standard implementation of 2-universal hashing leads to an expected number of Ω(log n) probes....
متن کاملBucket Hashing with a Small Key Size
In this paper we consider very fast evaluation of strongly universal hash functions, or equivalently, authentication codes. We show how it is possible to modify some known families of hash functions into a form such that the evaluation is similar to \bucket hashing", a technique for very fast hashing introduced by Rogaway. Rogaway's bucket hash family has a huge key size, which for common param...
متن کاملFast Modular Reduction over Euclidean Rings and Its Application to Universal Hash Functions
In this letter, we propose a fast modular reduction method over Euclidean rings, which is a generalization of Barrett’s reduction algorithm over the ring of integers. As an application, we construct new universal hash function families whose operations are modular arithmetic over a Euclidean ring, which can be any of three rings, the ring of integers, the ring of Gauss integers and the ring of ...
متن کاملOn the Minimum Number of Multiplications Necessary for Universal Hash Functions
Let d ≥ 1 be an integer and R1 be a finite ring whose elements are called block. A d-block universal hash over R1 is a vector of d multivariate polynomials in message and key block such that the maximum differential probability of the hash function is “low”. Two such single block hashes are pseudo dot-product (PDP) hash and BernsteinRabin-Winograd (BRW) hash which require n 2 multiplications fo...
متن کاملFurther More on Key Wrapping
At SAC 2009, Gennaro and Halevi showed that a key wrapping scheme using a universal hash function and ECB mode (a HtECB scheme) is broken, and the security of a scheme based on a universal hash function and CBC mode (a HtCBC scheme) has been left as an open problem. In this paper, we first generalize classical notions of universal and uniform hash functions, and propose two new notions, where w...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- IACR Trans. Symmetric Cryptol.
دوره 2017 شماره
صفحات -
تاریخ انتشار 2016